package com.jeecg.sms.job;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.apache.log4j.Logger;
import org.jeecgframework.web.system.service.SystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jeecg.sms.service.RptSmsSendServiceI;

@Service("messageSendTask")
public class MessageSendJob{
	private final static Logger  logger = Logger.getLogger(MessageSendJob.class);
	@Autowired
	private RptSmsSendServiceI rptSmsSendService;
	@Autowired
	private SystemService systemService;
	//定时任务发送短信
	public void send(){
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		long start = System.currentTimeMillis();
		logger.info(df.format(new Date()) +"===============短信发任务开始=================");;
		//System.out.println("===============短信发任务开始=================");
		rptSmsSendService.send();
		logger.info("===============短信发任务结束=================");
		long end = System.currentTimeMillis();
		long times = end - start;
		logger.info("总耗时"+times+"毫秒");
	}
}
